Cargando los dataframe

departamentos <- read_sf("Límites - mapas/DEPARTAMENTOS_inei_geogpsperu_suyopomalia.shp")
data_ins_long <- read_csv("Data_final/ins_final_long.csv")
## Rows: 50646 Columns: 7
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (4): distrito, departamento, provincia, rango_edad
## dbl (3): test_number, tamizaje_reactivo, year
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
data_ins_wide <- read_csv("Data_final/ins_final_wide.csv")
## Rows: 18520 Columns: 12
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): distrito, departamento, provincia
## dbl (9): year, test_number_12-17 años, test_number_18-29 años, test_number_3...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
pobfem <- read_csv("Data_final/pobfem_year.csv")
## Rows: 325 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): NOMBDEP
## dbl (2): UBIGEO, year
## num (1): POBFEM
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Limpiando la data

data_ins_long = rename(
  data_ins_long, c("NOMBDEP"="departamento","NOMBPROV"="provincia","NOMBDIST"="distrito"))

data_ins_wide = rename(
  data_ins_wide, c("NOMBDEP"="departamento","NOMBPROV"="provincia","NOMBDIST"="distrito"))

Agrupamos la data para tener la suma de tamizajes y tamizajes reactivos por año:

prepplot <- data_ins_long %>%
  group_by(NOMBDEP, year) %>%
  summarise(ntest =sum(test_number)) 
## `summarise()` has grouped output by 'NOMBDEP'. You can override using the
## `.groups` argument.
prepplot2 <- data_ins_long %>%
  group_by(NOMBDEP, year) %>%
  summarise(tamizaje_reactivo =sum(tamizaje_reactivo)) 
## `summarise()` has grouped output by 'NOMBDEP'. You can override using the
## `.groups` argument.

Unimos dataframes y obtenemos el número de casos ajustado por población

data_total_ntest <- prepplot %>%
  left_join(departamentos, by = c("NOMBDEP")) %>%
  left_join(pobfem, by = c("NOMBDEP","year")) %>%
  mutate(rate = (ntest/POBFEM)*10000)

data_total_reactivos <- prepplot2 %>%
  left_join(departamentos, by = c("NOMBDEP")) %>%
  left_join(pobfem, by = c("NOMBDEP","year")) %>%
  mutate(rate = (tamizaje_reactivo/POBFEM)*10000)
rm(prepplot,prepplot2,pobfem,departamentos)

MAPAS

Tamizajes de Sífilis por departamento

ggplot() +
  geom_sf(data = data_total_ntest, aes(geometry = geometry,fill = ntest), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, INS data",
        fill = "Syphilis screening")

# Tamizajes reactivos de Sífilis por departamentos

ggplot() +
  geom_sf(data = data_total_reactivos, aes(geometry = geometry,fill = tamizaje_reactivo), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Cases of syphilis in pregnants, INS data",
        fill = "Syphilis reactive")

#Tamizajes de Sífilis por departamento, ajustado por población

ggplot() +
  geom_sf(data = data_total_ntest, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, INS data",
        fill = "Syphilis screening per 10000 hab")

#Sífilis reactivo por departamento, ajustado por población

ggplot() +
  geom_sf(data = data_total_reactivos, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Cases of syphilis in pregnants, INS data",
        fill = "Syphilis in pregnants per 10000 hab.")

## Tamizaje por departamento, todos los años

data_total_ntesttotal <- data_total_ntest %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed (2011 - 2022)"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntesttotal
Syphilis test performed (2011 - 2022)
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2018 5155 69926 737.2079055
HUANCAVELICA 2018 13188 187245 704.3178723
AMAZONAS 2018 13675 203569 671.7624000
AMAZONAS 2017 13201 201423 655.3869220
LA LIBERTAD 2018 61912 978126 632.9654871
MADRE DE DIOS 2017 4178 67082 622.8198324
MADRE DE DIOS 2022 4801 80963 592.9869200
MADRE DE DIOS 2021 4585 78293 585.6206813
AMAZONAS 2022 12156 208363 583.4049231
AMAZONAS 2016 11214 199474 562.1785295
MADRE DE DIOS 2016 3563 64381 553.4241469
UCAYALI 2022 16239 294437 551.5271518
MADRE DE DIOS 2014 3099 59752 518.6437274
HUANCAVELICA 2017 9225 190016 485.4854328
PASCO 2018 6025 131785 457.1840498
LORETO 2018 21926 483188 453.7778256
LORETO 2021 22725 501365 453.2625931
APURIMAC 2022 9433 209664 449.9103327
PIURA 2018 44022 984282 447.2498735
HUANUCO 2017 16585 373161 444.4462310
LORETO 2022 22360 505412 442.4113397
LORETO 2017 20906 475588 439.5821593
AMAZONAS 2015 8675 198081 437.9521509
CUSCO 2018 28558 653351 437.1004253
HUANUCO 2022 16195 373411 433.7044168
HUANUCO 2018 16008 374602 427.3335433
APURIMAC 2021 8903 210201 423.5469860
PASCO 2021 5538 131029 422.6545269
MADRE DE DIOS 2015 2574 61928 415.6439736
HUANUCO 2016 15397 372089 413.7988492
LA LIBERTAD 2017 39198 957196 409.5086064
AMAZONAS 2014 8059 197364 408.3318133
HUANUCO 2021 15241 374996 406.4310019
PASCO 2022 5273 130170 405.0856572
LA LIBERTAD 2016 37584 937293 400.9845374
JUNIN 2018 26330 670777 392.5298572
PASCO 2017 5159 131573 392.1017230
TUMBES 2018 4355 111218 391.5733065
MADRE DE DIOS 2020 2956 75596 391.0259802
UCAYALI 2021 11171 288087 387.7648072
UCAYALI 2018 10219 266990 382.7484175
MADRE DE DIOS 2013 2164 57780 374.5240568
SAN MARTIN 2021 16046 432026 371.4128316
APURIMAC 2018 7739 208910 370.4466038
AMAZONAS 2021 7689 207863 369.9071023
LA LIBERTAD 2014 33342 905654 368.1538424
HUANUCO 2015 13528 372053 363.6041102
CAJAMARCA 2021 26296 727255 361.5788135
PASCO 2020 4708 131652 357.6094552
SAN MARTIN 2022 15595 438293 355.8122078
LA LIBERTAD 2013 31490 893226 352.5423577
HUANUCO 2020 13179 375922 350.5780454
ICA 2018 15949 461287 345.7500428
LORETO 2016 16174 468466 345.2545115
TACNA 2018 6053 175677 344.5527872
APURIMAC 2020 7224 210366 343.4015002
AREQUIPA 2018 25013 728576 343.3135322
AMAZONAS 2013 6745 197083 342.2415936
CAJAMARCA 2022 24832 726838 341.6442178
APURIMAC 2016 7028 206775 339.8863499
UCAYALI 2017 8806 259475 339.3775894
APURIMAC 2017 7015 207742 337.6784666
LA LIBERTAD 2015 30908 919993 335.9590779
CUSCO 2017 21522 643519 334.4423397
SAN MARTIN 2018 13571 408581 332.1495615
CUSCO 2014 20613 621301 331.7715568
HUANCAVELICA 2022 5700 173606 328.3296660
HUANCAVELICA 2021 5781 177521 325.6516130
PIURA 2017 31477 966689 325.6166151
LAMBAYEQUE 2017 20834 641219 324.9123934
JUNIN 2017 21509 663430 324.2090349
LAMBAYEQUE 2018 21112 652399 323.6056462
LAMBAYEQUE 2016 20204 630665 320.3602547
CUSCO 2016 20278 634312 319.6849500
JUNIN 2015 20804 651410 319.3687539
JUNIN 2022 21896 689199 317.7021441
PIURA 2016 30159 949910 317.4932362
MOQUEGUA 2016 2682 84642 316.8639682
AREQUIPA 2016 21994 694265 316.7954599
LORETO 2020 15683 496559 315.8335666
CUSCO 2015 19746 626826 315.0156503
CAJAMARCA 2018 22393 718945 311.4702794
JUNIN 2016 20436 656630 311.2254999
MOQUEGUA 2014 2522 82507 305.6710340
CAJAMARCA 2020 22168 726446 305.1568871
AREQUIPA 2017 21600 711041 303.7799508
AREQUIPA 2015 20514 679297 301.9886736
SAN MARTIN 2016 11691 391051 298.9635623
JUNIN 2014 19335 648069 298.3478611
SAN MARTIN 2017 11899 399596 297.7757535
ANCASH 2018 17043 574828 296.4886888
SAN MARTIN 2015 11348 383619 295.8143366
ICA 2016 12844 435873 294.6729896
CAJAMARCA 2017 20887 713729 292.6460884
UCAYALI 2016 7283 252303 288.6608562
APURIMAC 2015 5937 206383 287.6690425
AREQUIPA 2014 18919 666305 283.9390369
LAMBAYEQUE 2021 19186 680339 282.0064703
SAN MARTIN 2020 11973 425190 281.5917590
JUNIN 2021 19278 686597 280.7760593
CAJAMARCA 2015 19744 706496 279.4637195
JUNIN 2013 18026 645918 279.0756721
PASCO 2016 3664 131485 278.6629654
CAJAMARCA 2016 19722 709170 278.0997504
ANCASH 2022 16338 591791 276.0771962
HUANCAVELICA 2020 4994 181196 275.6131482
TACNA 2017 4726 171904 274.9208861
TACNA 2016 4625 168246 274.8950941
PUNO 2018 17200 625906 274.8016475
PIURA 2015 25507 935175 272.7510894
ICA 2017 12216 448283 272.5064301
ANCASH 2016 15264 562270 271.4710015
ANCASH 2017 15337 568305 269.8726916
SAN MARTIN 2014 10134 377465 268.4752229
TUMBES 2022 3194 119646 266.9541815
LAMBAYEQUE 2015 16562 621762 266.3720202
ICA 2014 11010 414943 265.3376488
ICA 2015 11265 424740 265.2210764
CALLAO 2018 14704 554432 265.2083574
TUMBES 2017 2883 108747 265.1107617
ANCASH 2021 15327 589223 260.1222288
LAMBAYEQUE 2022 17852 687215 259.7731423
PIURA 2022 26992 1043380 258.6976940
TUMBES 2021 3047 117811 258.6345927
MOQUEGUA 2013 2101 81638 257.3556432
MOQUEGUA 2017 2205 85953 256.5355485
CAJAMARCA 2014 18021 706065 255.2314589
APURIMAC 2014 5272 206684 255.0753808
SAN MARTIN 2013 9298 372145 249.8488492
MOQUEGUA 2015 2059 83488 246.6222691
AYACUCHO 2018 7922 322938 245.3102453
CALLAO 2017 13170 541179 243.3575582
MOQUEGUA 2011 1915 80126 238.9985772
PUNO 2017 14789 624277 236.8980437
HUANCAVELICA 2016 4563 193049 236.3648607
CUSCO 2022 16047 681600 235.4313380
CUSCO 2021 15815 676583 233.7481137
MOQUEGUA 2018 2008 87325 229.9456055
PUNO 2016 14312 623167 229.6655632
TACNA 2015 3784 164889 229.4877160
ICA 2022 11574 508445 227.6352408
PUNO 2022 13875 620188 223.7224841
HUANUCO 2014 8260 373348 221.2413084
ICA 2021 10925 497608 219.5503288
AREQUIPA 2022 17316 789700 219.2731417
CUSCO 2013 13521 617011 219.1370980
AREQUIPA 2013 14246 654590 217.6324111
LA LIBERTAD 2022 22744 1047119 217.2054943
CALLAO 2016 11231 528445 212.5292131
AYACUCHO 2022 6831 326552 209.1856733
LAMBAYEQUE 2020 14065 672557 209.1272561
CAJAMARCA 2013 14373 707062 203.2777889
HUANUCO 2013 7632 375531 203.2322232
PUNO 2021 12661 623879 202.9399932
LIMA 2018 106548 5284576 201.6207166
PIURA 2021 20521 1030681 199.1013708
AYACUCHO 2021 6495 326668 198.8257191
ANCASH 2015 10880 557603 195.1209014
AMAZONAS 2012 3788 197058 192.2276690
TUMBES 2020 2195 115846 189.4756832
PIURA 2014 17466 922689 189.2945510
PUNO 2015 11752 623663 188.4351004
ICA 2020 9005 486346 185.1562468
UCAYALI 2015 4506 245857 183.2772709
ICA 2013 7387 406028 181.9332657
CALLAO 2020 10481 579808 180.7667366
CUSCO 2020 12116 670532 180.6923458
TUMBES 2016 1894 106390 178.0242504
ANCASH 2020 10414 585806 177.7721635
CALLAO 2022 10541 602039 175.0883248
CALLAO 2021 10328 591161 174.7070595
TACNA 2020 3162 182822 172.9551148
SAN MARTIN 2012 6196 367403 168.6431521
LIMA 2017 86835 5165717 168.0986395
TACNA 2021 3069 185975 165.0221804
TACNA 2022 3115 188961 164.8488312
AYACUCHO 2017 5253 320653 163.8219508
AYACUCHO 2016 5203 318655 163.2800364
LA LIBERTAD 2012 14386 882171 163.0749594
MOQUEGUA 2022 1438 91986 156.3281369
AYACUCHO 2020 5027 326262 154.0786239
LIMA 2016 76155 5051764 150.7493224
PUNO 2020 9291 626381 148.3282539
TACNA 2014 2337 161839 144.4027707
PASCO 2015 1902 131747 144.3676137
PIURA 2013 13014 911633 142.7548147
LIMA 2022 80394 5698013 141.0912892
LA LIBERTAD 2021 14025 1032621 135.8194342
LORETO 2015 6041 462639 130.5769725
JUNIN 2020 8796 682973 128.7898643
AMAZONAS 2020 2662 207005 128.5959276
ANCASH 2014 6980 554473 125.8853001
PIURA 2020 12749 1016979 125.3614873
LIMA 2015 62023 4949734 125.3057235
AREQUIPA 2021 9693 776125 124.8896763
LIMA 2021 69214 5606249 123.4586619
TUMBES 2019 1376 113640 121.0841253
PUNO 2014 7311 626183 116.7550061
HUANCAVELICA 2011 2421 216879 111.6290651
TACNA 2013 1762 158971 110.8378258
APURIMAC 2013 2246 207430 108.2774912
MOQUEGUA 2021 947 90971 104.0991085
PASCO 2014 1326 132464 100.1026694
AYACUCHO 2015 3170 317473 99.8510110
HUANCAVELICA 2015 1954 196670 99.3542482
LORETO 2019 4868 490451 99.2555831
TUMBES 2015 1026 104311 98.3597128
LIMA 2014 47328 4860982 97.3630431
JUNIN 2012 6222 644512 96.5381560
LORETO 2014 4368 458340 95.3004320
CALLAO 2019 5379 567532 94.7787966
CALLAO 2015 4864 516902 94.0990749
MADRE DE DIOS 2012 525 55971 93.7985743
HUANUCO 2019 3419 375743 90.9930458
PASCO 2019 1168 131887 88.5606618
LA LIBERTAD 2020 8995 1016769 88.4665052
UCAYALI 2020 2482 281514 88.1661303
PASCO 2013 1168 133485 87.5004682
TACNA 2012 1276 156276 81.6504134
LAMBAYEQUE 2014 5009 614728 81.4831926
SAN MARTIN 2011 2916 362987 80.3334555
LIMA 2020 44044 5508910 79.9504802
HUANCAVELICA 2014 1597 201161 79.3891460
APURIMAC 2019 1660 209909 79.0818879
AREQUIPA 2020 5973 761731 78.4135082
CAJAMARCA 2012 5420 708952 76.4508740
ANCASH 2013 4022 552295 72.8234005
PUNO 2013 4583 630004 72.7455699
MOQUEGUA 2012 581 80853 71.8588055
LORETO 2013 3232 455024 71.0292204
LAMBAYEQUE 2019 4647 663186 70.0708399
MOQUEGUA 2020 611 89885 67.9757468
AMAZONAS 2011 1337 197113 67.8291132
ICA 2019 2995 474202 63.1587383
TACNA 2019 1132 179379 63.1066067
HUANCAVELICA 2012 1331 211683 62.8770378
CALLAO 2014 3000 506714 59.2049953
PIURA 2012 4958 901697 54.9852112
UCAYALI 2014 1314 240219 54.7000862
HUANCAVELICA 2013 1113 206304 53.9495114
MADRE DE DIOS 2019 375 72801 51.5102815
AMAZONAS 2019 1037 205550 50.4500122
LIMA 2013 23685 4780815 49.5417622
CALLAO 2013 2103 497432 42.2771354
PIURA 2019 4059 1001455 40.5310274
LAMBAYEQUE 2013 2381 608884 39.1043286
AREQUIPA 2011 2457 633964 38.7561439
ANCASH 2019 2220 580954 38.2130083
AREQUIPA 2012 2451 643896 38.0651534
AYACUCHO 2014 1136 317345 35.7970033
TUMBES 2013 342 100943 33.8805068
HUANUCO 2012 1158 378160 30.6219590
CALLAO 2012 1365 488810 27.9249606
PUNO 2019 1733 626969 27.6409200
PUNO 2012 1726 634504 27.2023502
LA LIBERTAD 2019 2671 998509 26.7498841
AREQUIPA 2019 1942 745822 26.0383845
ICA 2012 978 397901 24.5789782
ANCASH 2012 1274 550814 23.1294048
TUMBES 2012 219 99513 22.0071749
LIMA 2019 11509 5401318 21.3077623
TUMBES 2011 209 98207 21.2815787
LAMBAYEQUE 2012 1230 603897 20.3677117
LA LIBERTAD 2011 1761 871946 20.1962048
MOQUEGUA 2019 173 88666 19.5114249
LIMA 2012 9118 4707203 19.3703140
CALLAO 2011 922 480597 19.1844726
PUNO 2011 1210 639058 18.9341187
TUMBES 2014 186 102532 18.1406780
UCAYALI 2012 403 230473 17.4857792
AYACUCHO 2019 539 324984 16.5854319
CUSCO 2012 943 613591 15.3685435
UCAYALI 2011 328 226123 14.5053798
TACNA 2011 208 153747 13.5287193
JUNIN 2019 792 677635 11.6877080
UCAYALI 2013 237 235131 10.0794876
AYACUCHO 2013 300 317917 9.4364252
UCAYALI 2019 205 274464 7.4691034
PIURA 2011 592 892571 6.6325256
AYACUCHO 2012 211 318837 6.6178016
PASCO 2012 81 134653 6.0154620
LIMA 2011 2723 4638106 5.8709309
APURIMAC 2012 112 208444 5.3731458
HUANCAVELICA 2019 83 184413 4.5007673
CUSCO 2019 297 662719 4.4815374
LORETO 2011 179 449948 3.9782375
JUNIN 2011 216 643407 3.3571285
CAJAMARCA 2011 221 711198 3.1074328
MADRE DE DIOS 2011 13 54288 2.3946360
HUANUCO 2011 85 380794 2.2321780
PASCO 2011 21 135812 1.5462551
APURIMAC 2011 29 209550 1.3839179
LORETO 2012 59 452343 1.3043200
ICA 2011 50 390469 1.2805114
SAN MARTIN 2019 43 417336 1.0303449
AYACUCHO 2011 26 319750 0.8131353
CAJAMARCA 2019 45 723592 0.6218974
ANCASH 2011 21 549780 0.3819710
LAMBAYEQUE 2011 21 599438 0.3503281
CUSCO 2011 7 610678 0.1146267
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntesttotal)

TAMIZAJES POR AÑO

2022

data_total_ntest22 <- data_total_ntest %>%
  filter(year == "2022")

ggplot() +
  geom_sf(data = data_total_ntest22, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2022",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest22 <- data_total_ntest22 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2022"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest22
Syphilis test performed in 2022
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2022 4801 80963 592.9869
AMAZONAS 2022 12156 208363 583.4049
UCAYALI 2022 16239 294437 551.5272
APURIMAC 2022 9433 209664 449.9103
LORETO 2022 22360 505412 442.4113
HUANUCO 2022 16195 373411 433.7044
PASCO 2022 5273 130170 405.0857
SAN MARTIN 2022 15595 438293 355.8122
CAJAMARCA 2022 24832 726838 341.6442
HUANCAVELICA 2022 5700 173606 328.3297
JUNIN 2022 21896 689199 317.7021
ANCASH 2022 16338 591791 276.0772
TUMBES 2022 3194 119646 266.9542
LAMBAYEQUE 2022 17852 687215 259.7731
PIURA 2022 26992 1043380 258.6977
CUSCO 2022 16047 681600 235.4313
ICA 2022 11574 508445 227.6352
PUNO 2022 13875 620188 223.7225
AREQUIPA 2022 17316 789700 219.2731
LA LIBERTAD 2022 22744 1047119 217.2055
AYACUCHO 2022 6831 326552 209.1857
CALLAO 2022 10541 602039 175.0883
TACNA 2022 3115 188961 164.8488
MOQUEGUA 2022 1438 91986 156.3281
LIMA 2022 80394 5698013 141.0913
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest22)

2021

data_total_ntest21 <- data_total_ntest %>%
  filter(year == "2021")

ggplot() +
  geom_sf(data = data_total_ntest21, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2021",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest21 <- data_total_ntest21 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2021"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest21
Syphilis test performed in 2021
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2021 4585 78293 585.6207
LORETO 2021 22725 501365 453.2626
APURIMAC 2021 8903 210201 423.5470
PASCO 2021 5538 131029 422.6545
HUANUCO 2021 15241 374996 406.4310
UCAYALI 2021 11171 288087 387.7648
SAN MARTIN 2021 16046 432026 371.4128
AMAZONAS 2021 7689 207863 369.9071
CAJAMARCA 2021 26296 727255 361.5788
HUANCAVELICA 2021 5781 177521 325.6516
LAMBAYEQUE 2021 19186 680339 282.0065
JUNIN 2021 19278 686597 280.7761
ANCASH 2021 15327 589223 260.1222
TUMBES 2021 3047 117811 258.6346
CUSCO 2021 15815 676583 233.7481
ICA 2021 10925 497608 219.5503
PUNO 2021 12661 623879 202.9400
PIURA 2021 20521 1030681 199.1014
AYACUCHO 2021 6495 326668 198.8257
CALLAO 2021 10328 591161 174.7071
TACNA 2021 3069 185975 165.0222
LA LIBERTAD 2021 14025 1032621 135.8194
AREQUIPA 2021 9693 776125 124.8897
LIMA 2021 69214 5606249 123.4587
MOQUEGUA 2021 947 90971 104.0991
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest21)

2020

data_total_ntest20 <- data_total_ntest %>%
  filter(year == "2020")

ggplot() +
  geom_sf(data = data_total_ntest20, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2020",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest20 <- data_total_ntest20 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2020"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest20
Syphilis test performed in 2020
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2020 2956 75596 391.02598
PASCO 2020 4708 131652 357.60946
HUANUCO 2020 13179 375922 350.57805
APURIMAC 2020 7224 210366 343.40150
LORETO 2020 15683 496559 315.83357
CAJAMARCA 2020 22168 726446 305.15689
SAN MARTIN 2020 11973 425190 281.59176
HUANCAVELICA 2020 4994 181196 275.61315
LAMBAYEQUE 2020 14065 672557 209.12726
TUMBES 2020 2195 115846 189.47568
ICA 2020 9005 486346 185.15625
CALLAO 2020 10481 579808 180.76674
CUSCO 2020 12116 670532 180.69235
ANCASH 2020 10414 585806 177.77216
TACNA 2020 3162 182822 172.95511
AYACUCHO 2020 5027 326262 154.07862
PUNO 2020 9291 626381 148.32825
JUNIN 2020 8796 682973 128.78986
AMAZONAS 2020 2662 207005 128.59593
PIURA 2020 12749 1016979 125.36149
LA LIBERTAD 2020 8995 1016769 88.46651
UCAYALI 2020 2482 281514 88.16613
LIMA 2020 44044 5508910 79.95048
AREQUIPA 2020 5973 761731 78.41351
MOQUEGUA 2020 611 89885 67.97575
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest20)

2019

data_total_ntest19 <- data_total_ntest %>%
  filter(year == "2019")

ggplot() +
  geom_sf(data = data_total_ntest19, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2019",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest19 <- data_total_ntest19 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2019"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest19
Syphilis test performed in 2019
NOMBDEP year ntest POBFEM1 rate2
TUMBES 2019 1376 113640 121.0841253
LORETO 2019 4868 490451 99.2555831
CALLAO 2019 5379 567532 94.7787966
HUANUCO 2019 3419 375743 90.9930458
PASCO 2019 1168 131887 88.5606618
APURIMAC 2019 1660 209909 79.0818879
LAMBAYEQUE 2019 4647 663186 70.0708399
ICA 2019 2995 474202 63.1587383
TACNA 2019 1132 179379 63.1066067
MADRE DE DIOS 2019 375 72801 51.5102815
AMAZONAS 2019 1037 205550 50.4500122
PIURA 2019 4059 1001455 40.5310274
ANCASH 2019 2220 580954 38.2130083
PUNO 2019 1733 626969 27.6409200
LA LIBERTAD 2019 2671 998509 26.7498841
AREQUIPA 2019 1942 745822 26.0383845
LIMA 2019 11509 5401318 21.3077623
MOQUEGUA 2019 173 88666 19.5114249
AYACUCHO 2019 539 324984 16.5854319
JUNIN 2019 792 677635 11.6877080
UCAYALI 2019 205 274464 7.4691034
HUANCAVELICA 2019 83 184413 4.5007673
CUSCO 2019 297 662719 4.4815374
SAN MARTIN 2019 43 417336 1.0303449
CAJAMARCA 2019 45 723592 0.6218974
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest19)

2018

data_total_ntest18 <- data_total_ntest %>%
  filter(year == "2018")

ggplot() +
  geom_sf(data = data_total_ntest18, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2018",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest18 <- data_total_ntest18 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2018"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest18
Syphilis test performed in 2018
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2018 5155 69926 737.2079
HUANCAVELICA 2018 13188 187245 704.3179
AMAZONAS 2018 13675 203569 671.7624
LA LIBERTAD 2018 61912 978126 632.9655
PASCO 2018 6025 131785 457.1840
LORETO 2018 21926 483188 453.7778
PIURA 2018 44022 984282 447.2499
CUSCO 2018 28558 653351 437.1004
HUANUCO 2018 16008 374602 427.3335
JUNIN 2018 26330 670777 392.5299
TUMBES 2018 4355 111218 391.5733
UCAYALI 2018 10219 266990 382.7484
APURIMAC 2018 7739 208910 370.4466
ICA 2018 15949 461287 345.7500
TACNA 2018 6053 175677 344.5528
AREQUIPA 2018 25013 728576 343.3135
SAN MARTIN 2018 13571 408581 332.1496
LAMBAYEQUE 2018 21112 652399 323.6056
CAJAMARCA 2018 22393 718945 311.4703
ANCASH 2018 17043 574828 296.4887
PUNO 2018 17200 625906 274.8016
CALLAO 2018 14704 554432 265.2084
AYACUCHO 2018 7922 322938 245.3102
MOQUEGUA 2018 2008 87325 229.9456
LIMA 2018 106548 5284576 201.6207
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest18)

2017

data_total_ntest17 <- data_total_ntest %>%
  filter(year == "2017")

ggplot() +
  geom_sf(data = data_total_ntest17, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2017",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest17 <- data_total_ntest17 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2017"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest17
Syphilis test performed in 2017
NOMBDEP year ntest POBFEM1 rate2
AMAZONAS 2017 13201 201423 655.3869
MADRE DE DIOS 2017 4178 67082 622.8198
HUANCAVELICA 2017 9225 190016 485.4854
HUANUCO 2017 16585 373161 444.4462
LORETO 2017 20906 475588 439.5822
LA LIBERTAD 2017 39198 957196 409.5086
PASCO 2017 5159 131573 392.1017
UCAYALI 2017 8806 259475 339.3776
APURIMAC 2017 7015 207742 337.6785
CUSCO 2017 21522 643519 334.4423
PIURA 2017 31477 966689 325.6166
LAMBAYEQUE 2017 20834 641219 324.9124
JUNIN 2017 21509 663430 324.2090
AREQUIPA 2017 21600 711041 303.7800
SAN MARTIN 2017 11899 399596 297.7758
CAJAMARCA 2017 20887 713729 292.6461
TACNA 2017 4726 171904 274.9209
ICA 2017 12216 448283 272.5064
ANCASH 2017 15337 568305 269.8727
TUMBES 2017 2883 108747 265.1108
MOQUEGUA 2017 2205 85953 256.5355
CALLAO 2017 13170 541179 243.3576
PUNO 2017 14789 624277 236.8980
LIMA 2017 86835 5165717 168.0986
AYACUCHO 2017 5253 320653 163.8220
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest17)

2016

data_total_ntest16 <- data_total_ntest %>%
  filter(year == "2016")

ggplot() +
  geom_sf(data = data_total_ntest16, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2016",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest16 <- data_total_ntest16 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2016"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest16
Syphilis test performed in 2016
NOMBDEP year ntest POBFEM1 rate2
AMAZONAS 2016 11214 199474 562.1785
MADRE DE DIOS 2016 3563 64381 553.4241
HUANUCO 2016 15397 372089 413.7988
LA LIBERTAD 2016 37584 937293 400.9845
LORETO 2016 16174 468466 345.2545
APURIMAC 2016 7028 206775 339.8863
LAMBAYEQUE 2016 20204 630665 320.3603
CUSCO 2016 20278 634312 319.6849
PIURA 2016 30159 949910 317.4932
MOQUEGUA 2016 2682 84642 316.8640
AREQUIPA 2016 21994 694265 316.7955
JUNIN 2016 20436 656630 311.2255
SAN MARTIN 2016 11691 391051 298.9636
ICA 2016 12844 435873 294.6730
UCAYALI 2016 7283 252303 288.6609
PASCO 2016 3664 131485 278.6630
CAJAMARCA 2016 19722 709170 278.0998
TACNA 2016 4625 168246 274.8951
ANCASH 2016 15264 562270 271.4710
HUANCAVELICA 2016 4563 193049 236.3649
PUNO 2016 14312 623167 229.6656
CALLAO 2016 11231 528445 212.5292
TUMBES 2016 1894 106390 178.0243
AYACUCHO 2016 5203 318655 163.2800
LIMA 2016 76155 5051764 150.7493
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest16)

2015

data_total_ntest15 <- data_total_ntest %>%
  filter(year == "2015")

ggplot() +
  geom_sf(data = data_total_ntest15, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2015",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest15 <- data_total_ntest15 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2015"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest15
Syphilis test performed in 2015
NOMBDEP year ntest POBFEM1 rate2
AMAZONAS 2015 8675 198081 437.95215
MADRE DE DIOS 2015 2574 61928 415.64397
HUANUCO 2015 13528 372053 363.60411
LA LIBERTAD 2015 30908 919993 335.95908
JUNIN 2015 20804 651410 319.36875
CUSCO 2015 19746 626826 315.01565
AREQUIPA 2015 20514 679297 301.98867
SAN MARTIN 2015 11348 383619 295.81434
APURIMAC 2015 5937 206383 287.66904
CAJAMARCA 2015 19744 706496 279.46372
PIURA 2015 25507 935175 272.75109
LAMBAYEQUE 2015 16562 621762 266.37202
ICA 2015 11265 424740 265.22108
MOQUEGUA 2015 2059 83488 246.62227
TACNA 2015 3784 164889 229.48772
ANCASH 2015 10880 557603 195.12090
PUNO 2015 11752 623663 188.43510
UCAYALI 2015 4506 245857 183.27727
PASCO 2015 1902 131747 144.36761
LORETO 2015 6041 462639 130.57697
LIMA 2015 62023 4949734 125.30572
AYACUCHO 2015 3170 317473 99.85101
HUANCAVELICA 2015 1954 196670 99.35425
TUMBES 2015 1026 104311 98.35971
CALLAO 2015 4864 516902 94.09907
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest15)

2014

data_total_ntest14 <- data_total_ntest %>%
  filter(year == "2014")

ggplot() +
  geom_sf(data = data_total_ntest14, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2014",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest14 <- data_total_ntest14 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2014"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest14
Syphilis test performed in 2014
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2014 3099 59752 518.64373
AMAZONAS 2014 8059 197364 408.33181
LA LIBERTAD 2014 33342 905654 368.15384
CUSCO 2014 20613 621301 331.77156
MOQUEGUA 2014 2522 82507 305.67103
JUNIN 2014 19335 648069 298.34786
AREQUIPA 2014 18919 666305 283.93904
SAN MARTIN 2014 10134 377465 268.47522
ICA 2014 11010 414943 265.33765
CAJAMARCA 2014 18021 706065 255.23146
APURIMAC 2014 5272 206684 255.07538
HUANUCO 2014 8260 373348 221.24131
PIURA 2014 17466 922689 189.29455
TACNA 2014 2337 161839 144.40277
ANCASH 2014 6980 554473 125.88530
PUNO 2014 7311 626183 116.75501
PASCO 2014 1326 132464 100.10267
LIMA 2014 47328 4860982 97.36304
LORETO 2014 4368 458340 95.30043
LAMBAYEQUE 2014 5009 614728 81.48319
HUANCAVELICA 2014 1597 201161 79.38915
CALLAO 2014 3000 506714 59.20500
UCAYALI 2014 1314 240219 54.70009
AYACUCHO 2014 1136 317345 35.79700
TUMBES 2014 186 102532 18.14068
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest14)

2013

data_total_ntest13 <- data_total_ntest %>%
  filter(year == "2013")

ggplot() +
  geom_sf(data = data_total_ntest13, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2013",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest13 <- data_total_ntest13 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2013"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest13
Syphilis test performed in 2013
NOMBDEP year ntest POBFEM1 rate2
MADRE DE DIOS 2013 2164 57780 374.524057
LA LIBERTAD 2013 31490 893226 352.542358
AMAZONAS 2013 6745 197083 342.241594
JUNIN 2013 18026 645918 279.075672
MOQUEGUA 2013 2101 81638 257.355643
SAN MARTIN 2013 9298 372145 249.848849
CUSCO 2013 13521 617011 219.137098
AREQUIPA 2013 14246 654590 217.632411
CAJAMARCA 2013 14373 707062 203.277789
HUANUCO 2013 7632 375531 203.232223
ICA 2013 7387 406028 181.933266
PIURA 2013 13014 911633 142.754815
TACNA 2013 1762 158971 110.837826
APURIMAC 2013 2246 207430 108.277491
PASCO 2013 1168 133485 87.500468
ANCASH 2013 4022 552295 72.823401
PUNO 2013 4583 630004 72.745570
LORETO 2013 3232 455024 71.029220
HUANCAVELICA 2013 1113 206304 53.949511
LIMA 2013 23685 4780815 49.541762
CALLAO 2013 2103 497432 42.277135
LAMBAYEQUE 2013 2381 608884 39.104329
TUMBES 2013 342 100943 33.880507
UCAYALI 2013 237 235131 10.079488
AYACUCHO 2013 300 317917 9.436425
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest13)

2012

data_total_ntest12 <- data_total_ntest %>%
  filter(year == "2012")

ggplot() +
  geom_sf(data = data_total_ntest12, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2012",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest12 <- data_total_ntest12 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2012"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest12
Syphilis test performed in 2012
NOMBDEP year ntest POBFEM1 rate2
AMAZONAS 2012 3788 197058 192.227669
SAN MARTIN 2012 6196 367403 168.643152
LA LIBERTAD 2012 14386 882171 163.074959
JUNIN 2012 6222 644512 96.538156
MADRE DE DIOS 2012 525 55971 93.798574
TACNA 2012 1276 156276 81.650413
CAJAMARCA 2012 5420 708952 76.450874
MOQUEGUA 2012 581 80853 71.858805
HUANCAVELICA 2012 1331 211683 62.877038
PIURA 2012 4958 901697 54.985211
AREQUIPA 2012 2451 643896 38.065153
HUANUCO 2012 1158 378160 30.621959
CALLAO 2012 1365 488810 27.924961
PUNO 2012 1726 634504 27.202350
ICA 2012 978 397901 24.578978
ANCASH 2012 1274 550814 23.129405
TUMBES 2012 219 99513 22.007175
LAMBAYEQUE 2012 1230 603897 20.367712
LIMA 2012 9118 4707203 19.370314
UCAYALI 2012 403 230473 17.485779
CUSCO 2012 943 613591 15.368544
AYACUCHO 2012 211 318837 6.617802
PASCO 2012 81 134653 6.015462
APURIMAC 2012 112 208444 5.373146
LORETO 2012 59 452343 1.304320
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest12)

2011

data_total_ntest11 <- data_total_ntest %>%
  filter(year == "2011")

ggplot() +
  geom_sf(data = data_total_ntest11, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis screening in pregnants, 2011",
        fill = "Syphilis screening per 10000 hab")

data_total_ntest11 <- data_total_ntest11 %>%
  select(NOMBDEP, year, ntest, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Syphilis test performed in 2011"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_ntest11
Syphilis test performed in 2011
NOMBDEP year ntest POBFEM1 rate2
MOQUEGUA 2011 1915 80126 238.9985772
HUANCAVELICA 2011 2421 216879 111.6290651
SAN MARTIN 2011 2916 362987 80.3334555
AMAZONAS 2011 1337 197113 67.8291132
AREQUIPA 2011 2457 633964 38.7561439
TUMBES 2011 209 98207 21.2815787
LA LIBERTAD 2011 1761 871946 20.1962048
CALLAO 2011 922 480597 19.1844726
PUNO 2011 1210 639058 18.9341187
UCAYALI 2011 328 226123 14.5053798
TACNA 2011 208 153747 13.5287193
PIURA 2011 592 892571 6.6325256
LIMA 2011 2723 4638106 5.8709309
LORETO 2011 179 449948 3.9782375
JUNIN 2011 216 643407 3.3571285
CAJAMARCA 2011 221 711198 3.1074328
MADRE DE DIOS 2011 13 54288 2.3946360
HUANUCO 2011 85 380794 2.2321780
PASCO 2011 21 135812 1.5462551
APURIMAC 2011 29 209550 1.3839179
ICA 2011 50 390469 1.2805114
AYACUCHO 2011 26 319750 0.8131353
ANCASH 2011 21 549780 0.3819710
LAMBAYEQUE 2011 21 599438 0.3503281
CUSCO 2011 7 610678 0.1146267
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_ntest11)

Tamizaje reactivo en gestantes por departamento, todos los años

data_reactivos_allyears <- data_total_reactivos %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants (2011 - 2022)"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_reactivos_allyears
Cases of syphilis in pregnants (2011 - 2022)
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2016 149 199474 7.46964517
AMAZONAS 2013 144 197083 7.30656627
MADRE DE DIOS 2018 51 69926 7.29342448
AMAZONAS 2015 136 198081 6.86587810
AMAZONAS 2018 121 203569 5.94393056
AMAZONAS 2014 111 197364 5.62412598
MADRE DE DIOS 2021 43 78293 5.49218960
PASCO 2018 72 131785 5.46344425
MADRE DE DIOS 2022 44 80963 5.43458123
AMAZONAS 2017 105 201423 5.21291014
MADRE DE DIOS 2017 34 67082 5.06842372
UCAYALI 2022 148 294437 5.02654218
PASCO 2017 66 131573 5.01622673
UCAYALI 2018 132 266990 4.94400539
UCAYALI 2021 119 288087 4.13069663
AMAZONAS 2022 73 208363 3.50350110
UCAYALI 2017 88 259475 3.39146353
PASCO 2021 44 131029 3.35803524
MADRE DE DIOS 2016 20 64381 3.10650658
UCAYALI 2016 76 252303 3.01225114
PASCO 2022 39 130170 2.99608205
PASCO 2016 39 131485 2.96611781
LORETO 2017 141 475588 2.96475100
SAN MARTIN 2018 121 408581 2.96146908
LORETO 2018 138 483188 2.85603119
MADRE DE DIOS 2020 21 75596 2.77792476
MADRE DE DIOS 2013 16 57780 2.76912426
HUANUCO 2015 102 372053 2.74154489
PASCO 2020 36 131652 2.73448182
HUANUCO 2022 100 373411 2.67801431
MADRE DE DIOS 2014 16 59752 2.67773464
HUANUCO 2017 98 373161 2.62621228
HUANUCO 2013 98 375531 2.60963809
LORETO 2016 121 468466 2.58289823
HUANUCO 2018 95 374602 2.53602490
HUANUCO 2016 94 372089 2.52627732
JUNIN 2018 169 670777 2.51946623
SAN MARTIN 2015 96 383619 2.50248293
TACNA 2018 43 175677 2.44767386
HUANUCO 2014 89 373348 2.38383492
AMAZONAS 2012 46 197058 2.33433811
PASCO 2014 30 132464 2.26476628
PASCO 2013 30 133485 2.24744353
CUSCO 2018 143 653351 2.18871633
HUANUCO 2021 82 374996 2.18668999
ICA 2022 105 508445 2.06512012
PASCO 2015 27 131747 2.04938253
LORETO 2022 103 505412 2.03794132
CALLAO 2022 122 602039 2.02644679
TACNA 2021 37 185975 1.98951472
JUNIN 2022 137 689199 1.98781484
CALLAO 2020 115 579808 1.98341520
SAN MARTIN 2016 77 391051 1.96905263
HUANUCO 2020 74 375922 1.96849346
MADRE DE DIOS 2015 12 61928 1.93773414
UCAYALI 2015 47 245857 1.91168037
CALLAO 2021 113 591161 1.91149281
CALLAO 2018 103 554432 1.85775713
SAN MARTIN 2017 74 399596 1.85187039
TUMBES 2022 22 119646 1.83875767
PUNO 2018 113 625906 1.80538292
MADRE DE DIOS 2012 10 55971 1.78663951
ICA 2021 87 497608 1.74836417
AMAZONAS 2021 36 207863 1.73190996
LORETO 2021 84 501365 1.67542609
PASCO 2019 22 131887 1.66809466
SAN MARTIN 2022 72 438293 1.64273671
MOQUEGUA 2022 15 91986 1.63068293
LIMA 2022 905 5698013 1.58827296
JUNIN 2021 107 686597 1.55841054
SAN MARTIN 2014 58 377465 1.53656630
AYACUCHO 2021 50 326668 1.53060600
SAN MARTIN 2021 65 432026 1.50453908
LORETO 2020 74 496559 1.49025594
CALLAO 2017 80 541179 1.47825396
TUMBES 2018 16 111218 1.43861605
CUSCO 2017 91 643519 1.41409966
JUNIN 2015 92 651410 1.41232097
LA LIBERTAD 2018 136 978126 1.39041391
AYACUCHO 2022 44 326552 1.34741174
JUNIN 2017 89 663430 1.34151305
JUNIN 2013 86 645918 1.33143836
ICA 2018 61 461287 1.32238715
TACNA 2020 24 182822 1.31275229
ICA 2020 63 486346 1.29537408
UCAYALI 2014 30 240219 1.24886041
LORETO 2015 56 462639 1.21044702
MOQUEGUA 2021 11 90971 1.20917655
APURIMAC 2022 25 209664 1.19238400
CALLAO 2019 67 567532 1.18055017
CUSCO 2016 72 634312 1.13508810
SAN MARTIN 2013 41 372145 1.10172110
CALLAO 2016 58 528445 1.09755982
PUNO 2017 68 624277 1.08926006
AYACUCHO 2020 35 326262 1.07275748
HUANCAVELICA 2018 20 187245 1.06811931
MOQUEGUA 2016 9 84642 1.06330191
PIURA 2018 100 984282 1.01596900
ANCASH 2021 59 589223 1.00131869
HUANCAVELICA 2017 19 190016 0.99991580
LAMBAYEQUE 2015 62 621762 0.99716612
LAMBAYEQUE 2016 62 630665 0.98308928
JUNIN 2016 64 656630 0.97467371
TACNA 2015 16 164889 0.97034975
MOQUEGUA 2014 8 82507 0.96961470
LAMBAYEQUE 2018 63 652399 0.96566672
ANCASH 2022 56 591791 0.94628002
TUMBES 2016 10 106390 0.93993796
LIMA 2018 494 5284576 0.93479590
APURIMAC 2021 19 210201 0.90389675
MOQUEGUA 2020 8 89885 0.89002614
TACNA 2017 15 171904 0.87258004
LIMA 2021 487 5606249 0.86867351
CUSCO 2022 59 681600 0.86561033
AMAZONAS 2011 17 197113 0.86244946
PIURA 2022 89 1043380 0.85299699
LA LIBERTAD 2017 81 957196 0.84622167
TUMBES 2017 9 108747 0.82760904
ANCASH 2018 47 574828 0.81763588
LA LIBERTAD 2015 75 919993 0.81522359
JUNIN 2020 55 682973 0.80530270
JUNIN 2014 51 648069 0.78695324
ICA 2017 35 448283 0.78075680
LA LIBERTAD 2016 73 937293 0.77883863
TACNA 2016 13 168246 0.77267810
APURIMAC 2018 16 208910 0.76588004
CUSCO 2015 48 626826 0.76576275
AYACUCHO 2018 24 322938 0.74317671
LA LIBERTAD 2013 65 893226 0.72769937
AMAZONAS 2020 15 207005 0.72462018
LORETO 2014 33 458340 0.71998953
MOQUEGUA 2015 6 83488 0.71866616
LIMA 2016 363 5051764 0.71856088
LA LIBERTAD 2022 75 1047119 0.71625097
SAN MARTIN 2020 30 425190 0.70556692
PIURA 2021 72 1030681 0.69856726
HUANCAVELICA 2022 12 173606 0.69122035
AYACUCHO 2017 22 320653 0.68609993
LIMA 2017 354 5165717 0.68528725
LAMBAYEQUE 2022 47 687215 0.68391988
PIURA 2016 64 949910 0.67374804
AYACUCHO 2014 21 317345 0.66174038
PIURA 2017 63 966689 0.65170908
TACNA 2022 12 188961 0.63505168
AYACUCHO 2016 20 318655 0.62763804
HUANCAVELICA 2016 12 193049 0.62160384
APURIMAC 2020 13 210366 0.61797058
CUSCO 2013 38 617011 0.61587233
LORETO 2013 28 455024 0.61535216
MOQUEGUA 2013 5 81638 0.61245988
AREQUIPA 2022 48 789700 0.60782576
CAJAMARCA 2022 44 726838 0.60536186
ICA 2014 25 414943 0.60249239
AYACUCHO 2015 19 317473 0.59847609
TUMBES 2021 7 117811 0.59417202
PUNO 2016 37 623167 0.59374132
ANCASH 2016 33 562270 0.58690665
MOQUEGUA 2017 5 85953 0.58171326
CAJAMARCA 2021 41 727255 0.56376374
LAMBAYEQUE 2017 36 641219 0.56143065
ICA 2016 24 435873 0.55061910
MADRE DE DIOS 2019 4 72801 0.54944300
LAMBAYEQUE 2021 37 680339 0.54384652
PIURA 2015 50 935175 0.53465929
APURIMAC 2017 11 207742 0.52950294
ANCASH 2017 30 568305 0.52788555
SAN MARTIN 2012 19 367403 0.51714330
LA LIBERTAD 2014 46 905654 0.50792024
CUSCO 2020 34 670532 0.50706007
CUSCO 2021 34 676583 0.50252519
HUANCAVELICA 2020 9 181196 0.49669971
TUMBES 2015 5 104311 0.47933583
LIMA 2020 264 5508910 0.47922366
LAMBAYEQUE 2020 32 672557 0.47579610
ANCASH 2015 26 557603 0.46628157
MOQUEGUA 2018 4 87325 0.45805898
LA LIBERTAD 2021 47 1032621 0.45515247
CUSCO 2014 28 621301 0.45066723
LORETO 2019 22 490451 0.44856673
TACNA 2012 7 156276 0.44792547
TUMBES 2019 5 113640 0.43998592
CAJAMARCA 2014 31 706065 0.43905306
TACNA 2014 7 161839 0.43252862
TUMBES 2020 5 115846 0.43160748
CAJAMARCA 2018 31 718945 0.43118736
PUNO 2021 25 623879 0.40071873
PIURA 2013 36 911633 0.39489575
HUANCAVELICA 2021 7 177521 0.39431955
APURIMAC 2016 8 206775 0.38689397
AREQUIPA 2021 30 776125 0.38653567
CAJAMARCA 2020 28 726446 0.38543815
LIMA 2015 188 4949734 0.37981839
MOQUEGUA 2012 3 80853 0.37104375
PIURA 2014 33 922689 0.35765030
AREQUIPA 2020 26 761731 0.34132784
APURIMAC 2014 7 206684 0.33868127
TACNA 2019 6 179379 0.33448731
LIMA 2014 159 4860982 0.32709440
AREQUIPA 2017 23 711041 0.32346939
HUANUCO 2019 12 375743 0.31936723
TACNA 2013 5 158971 0.31452277
JUNIN 2012 20 644512 0.31031230
CAJAMARCA 2017 22 713729 0.30824024
PIURA 2020 31 1016979 0.30482439
APURIMAC 2015 6 206383 0.29072162
ANCASH 2020 17 585806 0.29019846
ANCASH 2014 16 554473 0.28856229
AREQUIPA 2018 21 728576 0.28823349
PUNO 2014 17 626183 0.27148613
ICA 2013 11 406028 0.27091728
AREQUIPA 2014 18 666305 0.27014655
LAMBAYEQUE 2014 16 614728 0.26027772
AREQUIPA 2016 18 694265 0.25926699
PUNO 2022 16 620188 0.25798629
LIMA 2013 122 4780815 0.25518662
CAJAMARCA 2015 17 706496 0.24062415
PUNO 2015 15 623663 0.24051451
LA LIBERTAD 2020 24 1016769 0.23604181
ANCASH 2013 13 552295 0.23538145
CAJAMARCA 2016 16 709170 0.22561586
AREQUIPA 2015 15 679297 0.22081652
CALLAO 2015 11 516902 0.21280630
PUNO 2020 13 626381 0.20754142
LA LIBERTAD 2012 18 882171 0.20404207
HUANCAVELICA 2015 4 196670 0.20338638
AREQUIPA 2013 13 654590 0.19859760
LAMBAYEQUE 2013 12 608884 0.19708187
ICA 2019 9 474202 0.18979254
HUANCAVELICA 2012 4 211683 0.18896180
ICA 2015 8 424740 0.18835052
HUANUCO 2012 7 378160 0.18510683
LAMBAYEQUE 2019 12 663186 0.18094471
UCAYALI 2020 5 281514 0.17761106
UCAYALI 2013 4 235131 0.17011793
PIURA 2019 16 1001455 0.15976754
PASCO 2012 2 134653 0.14852993
HUANCAVELICA 2013 3 206304 0.14541647
CALLAO 2013 7 497432 0.14072275
LIMA 2019 76 5401318 0.14070640
CALLAO 2014 7 506714 0.13814499
PUNO 2013 8 630004 0.12698332
AYACUCHO 2013 4 317917 0.12581900
MOQUEGUA 2019 1 88666 0.11278280
LA LIBERTAD 2019 11 998509 0.11016425
TUMBES 2012 1 99513 0.10048938
LAMBAYEQUE 2012 6 603897 0.09935469
CAJAMARCA 2012 7 708952 0.09873729
AMAZONAS 2019 2 205550 0.09729993
APURIMAC 2013 2 207430 0.09641807
PUNO 2019 6 626969 0.09569851
CAJAMARCA 2013 6 707062 0.08485819
AREQUIPA 2012 5 643896 0.07765229
ICA 2012 3 397901 0.07539564
LIMA 2012 34 4707203 0.07222973
AREQUIPA 2019 5 745822 0.06704012
CUSCO 2012 4 613591 0.06519000
CUSCO 2019 4 662719 0.06035741
PIURA 2012 5 901697 0.05545100
APURIMAC 2019 1 209909 0.04763969
LORETO 2012 2 452343 0.04421424
UCAYALI 2012 1 230473 0.04338903
UCAYALI 2019 1 274464 0.03643465
ANCASH 2012 2 550814 0.03630990
AYACUCHO 2019 1 324984 0.03077075
CAJAMARCA 2019 2 723592 0.02763989
SAN MARTIN 2011 1 362987 0.02754920
CALLAO 2012 1 488810 0.02045785
ANCASH 2019 1 580954 0.01721307
AREQUIPA 2011 1 633964 0.01577377
JUNIN 2019 1 677635 0.01475721
ANCASH 2011 0 549780 0.00000000
APURIMAC 2011 0 209550 0.00000000
APURIMAC 2012 0 208444 0.00000000
AYACUCHO 2011 0 319750 0.00000000
AYACUCHO 2012 0 318837 0.00000000
CAJAMARCA 2011 0 711198 0.00000000
CALLAO 2011 0 480597 0.00000000
CUSCO 2011 0 610678 0.00000000
HUANCAVELICA 2011 0 216879 0.00000000
HUANCAVELICA 2014 0 201161 0.00000000
HUANCAVELICA 2019 0 184413 0.00000000
HUANUCO 2011 0 380794 0.00000000
ICA 2011 0 390469 0.00000000
JUNIN 2011 0 643407 0.00000000
LA LIBERTAD 2011 0 871946 0.00000000
LAMBAYEQUE 2011 0 599438 0.00000000
LIMA 2011 0 4638106 0.00000000
LORETO 2011 0 449948 0.00000000
MADRE DE DIOS 2011 0 54288 0.00000000
MOQUEGUA 2011 0 80126 0.00000000
PASCO 2011 0 135812 0.00000000
PIURA 2011 0 892571 0.00000000
PUNO 2011 0 639058 0.00000000
PUNO 2012 0 634504 0.00000000
SAN MARTIN 2019 0 417336 0.00000000
TACNA 2011 0 153747 0.00000000
TUMBES 2011 0 98207 0.00000000
TUMBES 2013 0 100943 0.00000000
TUMBES 2014 0 102532 0.00000000
UCAYALI 2011 0 226123 0.00000000
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_reactivos_allyears)

TAMIZAJES POR AÑO

2022

data_total_reactivo22 <- data_total_reactivos %>%
  filter(year == "2022")

ggplot() +
  geom_sf(data = data_total_reactivo22, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2022",
        fill = "Cases per 10000 hab")

data_total_reactivo22 <- data_total_reactivo22 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2022"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo22
Cases of syphilis in pregnants in 2022
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
MADRE DE DIOS 2022 44 80963 5.4345812
UCAYALI 2022 148 294437 5.0265422
AMAZONAS 2022 73 208363 3.5035011
PASCO 2022 39 130170 2.9960820
HUANUCO 2022 100 373411 2.6780143
ICA 2022 105 508445 2.0651201
LORETO 2022 103 505412 2.0379413
CALLAO 2022 122 602039 2.0264468
JUNIN 2022 137 689199 1.9878148
TUMBES 2022 22 119646 1.8387577
SAN MARTIN 2022 72 438293 1.6427367
MOQUEGUA 2022 15 91986 1.6306829
LIMA 2022 905 5698013 1.5882730
AYACUCHO 2022 44 326552 1.3474117
APURIMAC 2022 25 209664 1.1923840
ANCASH 2022 56 591791 0.9462800
CUSCO 2022 59 681600 0.8656103
PIURA 2022 89 1043380 0.8529970
LA LIBERTAD 2022 75 1047119 0.7162510
HUANCAVELICA 2022 12 173606 0.6912203
LAMBAYEQUE 2022 47 687215 0.6839199
TACNA 2022 12 188961 0.6350517
AREQUIPA 2022 48 789700 0.6078258
CAJAMARCA 2022 44 726838 0.6053619
PUNO 2022 16 620188 0.2579863
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo22)

2021

data_total_reactivo21 <- data_total_reactivos %>%
  filter(year == "2021")

ggplot() +
  geom_sf(data = data_total_reactivo21, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2021",
        fill = "Cases per 10000 hab")

data_total_reactivo21 <- data_total_reactivo21 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2021"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo21
Cases of syphilis in pregnants in 2021
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
MADRE DE DIOS 2021 43 78293 5.4921896
UCAYALI 2021 119 288087 4.1306966
PASCO 2021 44 131029 3.3580352
HUANUCO 2021 82 374996 2.1866900
TACNA 2021 37 185975 1.9895147
CALLAO 2021 113 591161 1.9114928
ICA 2021 87 497608 1.7483642
AMAZONAS 2021 36 207863 1.7319100
LORETO 2021 84 501365 1.6754261
JUNIN 2021 107 686597 1.5584105
AYACUCHO 2021 50 326668 1.5306060
SAN MARTIN 2021 65 432026 1.5045391
MOQUEGUA 2021 11 90971 1.2091766
ANCASH 2021 59 589223 1.0013187
APURIMAC 2021 19 210201 0.9038967
LIMA 2021 487 5606249 0.8686735
PIURA 2021 72 1030681 0.6985673
TUMBES 2021 7 117811 0.5941720
CAJAMARCA 2021 41 727255 0.5637637
LAMBAYEQUE 2021 37 680339 0.5438465
CUSCO 2021 34 676583 0.5025252
LA LIBERTAD 2021 47 1032621 0.4551525
PUNO 2021 25 623879 0.4007187
HUANCAVELICA 2021 7 177521 0.3943195
AREQUIPA 2021 30 776125 0.3865357
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo21)

2020

data_total_reactivo20 <- data_total_reactivos %>%
  filter(year == "2020")

ggplot() +
  geom_sf(data = data_total_reactivo20, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2020",
        fill = "Cases per 10000 hab")

data_total_reactivo20 <- data_total_reactivo20 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2020"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo20
Cases of syphilis in pregnants in 2020
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
MADRE DE DIOS 2020 21 75596 2.7779248
PASCO 2020 36 131652 2.7344818
CALLAO 2020 115 579808 1.9834152
HUANUCO 2020 74 375922 1.9684935
LORETO 2020 74 496559 1.4902559
TACNA 2020 24 182822 1.3127523
ICA 2020 63 486346 1.2953741
AYACUCHO 2020 35 326262 1.0727575
MOQUEGUA 2020 8 89885 0.8900261
JUNIN 2020 55 682973 0.8053027
AMAZONAS 2020 15 207005 0.7246202
SAN MARTIN 2020 30 425190 0.7055669
APURIMAC 2020 13 210366 0.6179706
CUSCO 2020 34 670532 0.5070601
HUANCAVELICA 2020 9 181196 0.4966997
LIMA 2020 264 5508910 0.4792237
LAMBAYEQUE 2020 32 672557 0.4757961
TUMBES 2020 5 115846 0.4316075
CAJAMARCA 2020 28 726446 0.3854381
AREQUIPA 2020 26 761731 0.3413278
PIURA 2020 31 1016979 0.3048244
ANCASH 2020 17 585806 0.2901985
LA LIBERTAD 2020 24 1016769 0.2360418
PUNO 2020 13 626381 0.2075414
UCAYALI 2020 5 281514 0.1776111
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo20)

2019

data_total_reactivo19 <- data_total_reactivos %>%
  filter(year == "2019")

ggplot() +
  geom_sf(data = data_total_reactivo19, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2019",
        fill = "Cases per 10000 hab")

data_total_reactivo19 <- data_total_reactivo19 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2019"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo19
Cases of syphilis in pregnants in 2019
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
PASCO 2019 22 131887 1.66809466
CALLAO 2019 67 567532 1.18055017
MADRE DE DIOS 2019 4 72801 0.54944300
LORETO 2019 22 490451 0.44856673
TUMBES 2019 5 113640 0.43998592
TACNA 2019 6 179379 0.33448731
HUANUCO 2019 12 375743 0.31936723
ICA 2019 9 474202 0.18979254
LAMBAYEQUE 2019 12 663186 0.18094471
PIURA 2019 16 1001455 0.15976754
LIMA 2019 76 5401318 0.14070640
MOQUEGUA 2019 1 88666 0.11278280
LA LIBERTAD 2019 11 998509 0.11016425
AMAZONAS 2019 2 205550 0.09729993
PUNO 2019 6 626969 0.09569851
AREQUIPA 2019 5 745822 0.06704012
CUSCO 2019 4 662719 0.06035741
APURIMAC 2019 1 209909 0.04763969
UCAYALI 2019 1 274464 0.03643465
AYACUCHO 2019 1 324984 0.03077075
CAJAMARCA 2019 2 723592 0.02763989
ANCASH 2019 1 580954 0.01721307
JUNIN 2019 1 677635 0.01475721
HUANCAVELICA 2019 0 184413 0.00000000
SAN MARTIN 2019 0 417336 0.00000000
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo19)

2018

data_total_reactivo18 <- data_total_reactivos %>%
  filter(year == "2018")

ggplot() +
  geom_sf(data = data_total_reactivo18, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2018",
        fill = "Cases per 10000 hab")

data_total_reactivo18 <- data_total_reactivo18 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2018"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo18
Cases of syphilis in pregnants in 2018
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
MADRE DE DIOS 2018 51 69926 7.2934245
AMAZONAS 2018 121 203569 5.9439306
PASCO 2018 72 131785 5.4634442
UCAYALI 2018 132 266990 4.9440054
SAN MARTIN 2018 121 408581 2.9614691
LORETO 2018 138 483188 2.8560312
HUANUCO 2018 95 374602 2.5360249
JUNIN 2018 169 670777 2.5194662
TACNA 2018 43 175677 2.4476739
CUSCO 2018 143 653351 2.1887163
CALLAO 2018 103 554432 1.8577571
PUNO 2018 113 625906 1.8053829
TUMBES 2018 16 111218 1.4386161
LA LIBERTAD 2018 136 978126 1.3904139
ICA 2018 61 461287 1.3223871
HUANCAVELICA 2018 20 187245 1.0681193
PIURA 2018 100 984282 1.0159690
LAMBAYEQUE 2018 63 652399 0.9656667
LIMA 2018 494 5284576 0.9347959
ANCASH 2018 47 574828 0.8176359
APURIMAC 2018 16 208910 0.7658800
AYACUCHO 2018 24 322938 0.7431767
MOQUEGUA 2018 4 87325 0.4580590
CAJAMARCA 2018 31 718945 0.4311874
AREQUIPA 2018 21 728576 0.2882335
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo18)

2017

data_total_reactivo17 <- data_total_reactivos %>%
  filter(year == "2017")

ggplot() +
  geom_sf(data = data_total_reactivo17, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2017",
        fill = "Cases per 10000 hab")

data_total_reactivo17 <- data_total_reactivo17 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2017"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo17
Cases of syphilis in pregnants in 2017
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2017 105 201423 5.2129101
MADRE DE DIOS 2017 34 67082 5.0684237
PASCO 2017 66 131573 5.0162267
UCAYALI 2017 88 259475 3.3914635
LORETO 2017 141 475588 2.9647510
HUANUCO 2017 98 373161 2.6262123
SAN MARTIN 2017 74 399596 1.8518704
CALLAO 2017 80 541179 1.4782540
CUSCO 2017 91 643519 1.4140997
JUNIN 2017 89 663430 1.3415130
PUNO 2017 68 624277 1.0892601
HUANCAVELICA 2017 19 190016 0.9999158
TACNA 2017 15 171904 0.8725800
LA LIBERTAD 2017 81 957196 0.8462217
TUMBES 2017 9 108747 0.8276090
ICA 2017 35 448283 0.7807568
AYACUCHO 2017 22 320653 0.6860999
LIMA 2017 354 5165717 0.6852873
PIURA 2017 63 966689 0.6517091
MOQUEGUA 2017 5 85953 0.5817133
LAMBAYEQUE 2017 36 641219 0.5614307
APURIMAC 2017 11 207742 0.5295029
ANCASH 2017 30 568305 0.5278856
AREQUIPA 2017 23 711041 0.3234694
CAJAMARCA 2017 22 713729 0.3082402
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo17)

2016

data_total_reactivo16 <- data_total_reactivos %>%
  filter(year == "2016")

ggplot() +
  geom_sf(data = data_total_reactivo16, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2016",
        fill = "Cases per 10000 hab")

data_total_reactivo16 <- data_total_reactivo16 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2016"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo16
Cases of syphilis in pregnants in 2016
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2016 149 199474 7.4696452
MADRE DE DIOS 2016 20 64381 3.1065066
UCAYALI 2016 76 252303 3.0122511
PASCO 2016 39 131485 2.9661178
LORETO 2016 121 468466 2.5828982
HUANUCO 2016 94 372089 2.5262773
SAN MARTIN 2016 77 391051 1.9690526
CUSCO 2016 72 634312 1.1350881
CALLAO 2016 58 528445 1.0975598
MOQUEGUA 2016 9 84642 1.0633019
LAMBAYEQUE 2016 62 630665 0.9830893
JUNIN 2016 64 656630 0.9746737
TUMBES 2016 10 106390 0.9399380
LA LIBERTAD 2016 73 937293 0.7788386
TACNA 2016 13 168246 0.7726781
LIMA 2016 363 5051764 0.7185609
PIURA 2016 64 949910 0.6737480
AYACUCHO 2016 20 318655 0.6276380
HUANCAVELICA 2016 12 193049 0.6216038
PUNO 2016 37 623167 0.5937413
ANCASH 2016 33 562270 0.5869066
ICA 2016 24 435873 0.5506191
APURIMAC 2016 8 206775 0.3868940
AREQUIPA 2016 18 694265 0.2592670
CAJAMARCA 2016 16 709170 0.2256159
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo16)

2015

data_total_reactivo15 <- data_total_reactivos %>%
  filter(year == "2015")

ggplot() +
  geom_sf(data = data_total_reactivo15, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2015",
        fill = "Cases per 10000 hab")

data_total_reactivo15 <- data_total_reactivo15 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2015"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo15
Cases of syphilis in pregnants in 2015
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2015 136 198081 6.8658781
HUANUCO 2015 102 372053 2.7415449
SAN MARTIN 2015 96 383619 2.5024829
PASCO 2015 27 131747 2.0493825
MADRE DE DIOS 2015 12 61928 1.9377341
UCAYALI 2015 47 245857 1.9116804
JUNIN 2015 92 651410 1.4123210
LORETO 2015 56 462639 1.2104470
LAMBAYEQUE 2015 62 621762 0.9971661
TACNA 2015 16 164889 0.9703498
LA LIBERTAD 2015 75 919993 0.8152236
CUSCO 2015 48 626826 0.7657627
MOQUEGUA 2015 6 83488 0.7186662
AYACUCHO 2015 19 317473 0.5984761
PIURA 2015 50 935175 0.5346593
TUMBES 2015 5 104311 0.4793358
ANCASH 2015 26 557603 0.4662816
LIMA 2015 188 4949734 0.3798184
APURIMAC 2015 6 206383 0.2907216
CAJAMARCA 2015 17 706496 0.2406242
PUNO 2015 15 623663 0.2405145
AREQUIPA 2015 15 679297 0.2208165
CALLAO 2015 11 516902 0.2128063
HUANCAVELICA 2015 4 196670 0.2033864
ICA 2015 8 424740 0.1883505
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo15)

2014

data_total_reactivo14 <- data_total_reactivos %>%
  filter(year == "2014")

ggplot() +
  geom_sf(data = data_total_reactivo14, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2014",
        fill = "Cases per 10000 hab")

data_total_reactivo14 <- data_total_reactivo14 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2014"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo14
Cases of syphilis in pregnants in 2014
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2014 111 197364 5.6241260
MADRE DE DIOS 2014 16 59752 2.6777346
HUANUCO 2014 89 373348 2.3838349
PASCO 2014 30 132464 2.2647663
SAN MARTIN 2014 58 377465 1.5365663
UCAYALI 2014 30 240219 1.2488604
MOQUEGUA 2014 8 82507 0.9696147
JUNIN 2014 51 648069 0.7869532
LORETO 2014 33 458340 0.7199895
AYACUCHO 2014 21 317345 0.6617404
ICA 2014 25 414943 0.6024924
LA LIBERTAD 2014 46 905654 0.5079202
CUSCO 2014 28 621301 0.4506672
CAJAMARCA 2014 31 706065 0.4390531
TACNA 2014 7 161839 0.4325286
PIURA 2014 33 922689 0.3576503
APURIMAC 2014 7 206684 0.3386813
LIMA 2014 159 4860982 0.3270944
ANCASH 2014 16 554473 0.2885623
PUNO 2014 17 626183 0.2714861
AREQUIPA 2014 18 666305 0.2701466
LAMBAYEQUE 2014 16 614728 0.2602777
CALLAO 2014 7 506714 0.1381450
HUANCAVELICA 2014 0 201161 0.0000000
TUMBES 2014 0 102532 0.0000000
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo14)

2013

data_total_reactivo13 <- data_total_reactivos %>%
  filter(year == "2013")

ggplot() +
  geom_sf(data = data_total_reactivo13, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2013",
        fill = "Cases per 10000 hab")

data_total_reactivo13 <- data_total_reactivo13 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2013"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo13
Cases of syphilis in pregnants in 2013
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2013 144 197083 7.30656627
MADRE DE DIOS 2013 16 57780 2.76912426
HUANUCO 2013 98 375531 2.60963809
PASCO 2013 30 133485 2.24744353
JUNIN 2013 86 645918 1.33143836
SAN MARTIN 2013 41 372145 1.10172110
LA LIBERTAD 2013 65 893226 0.72769937
CUSCO 2013 38 617011 0.61587233
LORETO 2013 28 455024 0.61535216
MOQUEGUA 2013 5 81638 0.61245988
PIURA 2013 36 911633 0.39489575
TACNA 2013 5 158971 0.31452277
ICA 2013 11 406028 0.27091728
LIMA 2013 122 4780815 0.25518662
ANCASH 2013 13 552295 0.23538145
AREQUIPA 2013 13 654590 0.19859760
LAMBAYEQUE 2013 12 608884 0.19708187
UCAYALI 2013 4 235131 0.17011793
HUANCAVELICA 2013 3 206304 0.14541647
CALLAO 2013 7 497432 0.14072275
PUNO 2013 8 630004 0.12698332
AYACUCHO 2013 4 317917 0.12581900
APURIMAC 2013 2 207430 0.09641807
CAJAMARCA 2013 6 707062 0.08485819
TUMBES 2013 0 100943 0.00000000
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo13)

2012

data_total_reactivo12 <- data_total_reactivos %>%
  filter(year == "2012")

ggplot() +
  geom_sf(data = data_total_reactivo12, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2012",
        fill = "Cases per 10000 hab")

data_total_reactivo12 <- data_total_reactivo12 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2012"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo12
Cases of syphilis in pregnants in 2012
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2012 46 197058 2.33433811
MADRE DE DIOS 2012 10 55971 1.78663951
SAN MARTIN 2012 19 367403 0.51714330
TACNA 2012 7 156276 0.44792547
MOQUEGUA 2012 3 80853 0.37104375
JUNIN 2012 20 644512 0.31031230
LA LIBERTAD 2012 18 882171 0.20404207
HUANCAVELICA 2012 4 211683 0.18896180
HUANUCO 2012 7 378160 0.18510683
PASCO 2012 2 134653 0.14852993
TUMBES 2012 1 99513 0.10048938
LAMBAYEQUE 2012 6 603897 0.09935469
CAJAMARCA 2012 7 708952 0.09873729
AREQUIPA 2012 5 643896 0.07765229
ICA 2012 3 397901 0.07539564
LIMA 2012 34 4707203 0.07222973
CUSCO 2012 4 613591 0.06519000
PIURA 2012 5 901697 0.05545100
LORETO 2012 2 452343 0.04421424
UCAYALI 2012 1 230473 0.04338903
ANCASH 2012 2 550814 0.03630990
CALLAO 2012 1 488810 0.02045785
APURIMAC 2012 0 208444 0.00000000
AYACUCHO 2012 0 318837 0.00000000
PUNO 2012 0 634504 0.00000000
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo12)

2011

data_total_reactivo11 <- data_total_reactivos %>%
  filter(year == "2011")

ggplot() +
  geom_sf(data = data_total_reactivo11, aes(geometry = geometry,fill = rate), color = "white", size = 0.2) +
  scale_fill_gradient(low = "darkgoldenrod1", high = "darkred") +
   labs(title="Syphilis cases in pregnants, 2011",
        fill = "Cases per 10000 hab")

data_total_reactivo11 <- data_total_reactivo11 %>%
  select(NOMBDEP, year, tamizaje_reactivo, POBFEM, rate) %>%
  arrange(desc(rate)) %>%
  gt(groupname_col = FALSE) %>%
  tab_header(
    title = "Cases of syphilis in pregnants in 2011"
  ) %>%
  tab_footnote(
    footnote = "Population at June 30th",
    locations = cells_column_labels(columns = POBFEM)
  ) %>%
  tab_footnote(
    footnote = "Rate per 10 000 hab.",
    locations = cells_column_labels(columns = rate)
  )
data_total_reactivo11
Cases of syphilis in pregnants in 2011
NOMBDEP year tamizaje_reactivo POBFEM1 rate2
AMAZONAS 2011 17 197113 0.86244946
SAN MARTIN 2011 1 362987 0.02754920
AREQUIPA 2011 1 633964 0.01577377
ANCASH 2011 0 549780 0.00000000
APURIMAC 2011 0 209550 0.00000000
AYACUCHO 2011 0 319750 0.00000000
CAJAMARCA 2011 0 711198 0.00000000
CALLAO 2011 0 480597 0.00000000
CUSCO 2011 0 610678 0.00000000
HUANCAVELICA 2011 0 216879 0.00000000
HUANUCO 2011 0 380794 0.00000000
ICA 2011 0 390469 0.00000000
JUNIN 2011 0 643407 0.00000000
LA LIBERTAD 2011 0 871946 0.00000000
LAMBAYEQUE 2011 0 599438 0.00000000
LIMA 2011 0 4638106 0.00000000
LORETO 2011 0 449948 0.00000000
MADRE DE DIOS 2011 0 54288 0.00000000
MOQUEGUA 2011 0 80126 0.00000000
PASCO 2011 0 135812 0.00000000
PIURA 2011 0 892571 0.00000000
PUNO 2011 0 639058 0.00000000
TACNA 2011 0 153747 0.00000000
TUMBES 2011 0 98207 0.00000000
UCAYALI 2011 0 226123 0.00000000
1 Population at June 30th
2 Rate per 10 000 hab.
rm(data_total_reactivo11)